package org.cfx.org.query;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;


/**
 * @author RTX 9090
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class BaseQuery {
    private Integer currentPage = 1;
    private Integer pageSize = 5;

    /**
     * 查询开始
     * @return 算好的分页索引
     */
    public Integer getBegin(){
        return (this.currentPage-1)*this.pageSize;
    }
}
